#ifndef WINFORM
#define WINFORM

#include <windows.h>
#include <iostream>
#include <fstream>
#include <vcclr.h>

#include <al.h>
#include <alc.h>
#include <alut.h>
#include <math.h>

extern int LoadALData(int note, int oct);

extern ALuint Buffer[16];
extern ALuint Source[16];

#pragma once

using namespace std;

namespace DoesThisWork{

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace System::IO;
	using namespace System::Runtime::InteropServices;

	/// <summary>
	/// Summary for WinFormMezzoForte
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class WinFormMezzoForte : public System::Windows::Forms::Form
	{
	public:
		WinFormMezzoForte(void)
		{
			InitializeComponent();
			//
			theResources = (gcnew System::ComponentModel::ComponentResourceManager(WinFormMezzoForte::typeid));
			filePtrLoaded = 0;

			this->exportSaveDialog->Title = "Export to...";
			this->exportSaveDialog->Filter = "Mezzo Forte Song File (.MFS)|*.MSF";
			this->openFileDialog1->Filter = "Mezzo Forte Generated Text (.MGT)|*.MGT|All Files (*.*)|*.*";

			this->NoteCombo->SelectedIndex = 0;


			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~WinFormMezzoForte()
		{
			if (components)
			{
				delete components;
			}
		}

	private: System::Windows::Forms::MenuStrip^  menuStrip1;
	protected: 
	private: System::Windows::Forms::ToolStripMenuItem^  fileToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  newToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  saveToolStripMenuItem;
	private: System::Windows::Forms::ToolStripSeparator^  toolStripMenuItem1;
	private: System::Windows::Forms::ToolStripMenuItem^  exportToolStripMenuItem;
	private: System::Windows::Forms::ToolStripSeparator^  toolStripMenuItem2;
	private: System::Windows::Forms::ToolStripMenuItem^  exitToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  opeToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  saveAsToolStripMenuItem;


	private: System::Windows::Forms::NumericUpDown^  OctaveNumericBox;
	private: System::Windows::Forms::Label^  OctaveLabel;
	private: System::Windows::Forms::Button^  ClearButton;
	private: System::Windows::Forms::Button^  PlaybackButton;
	private: System::Windows::Forms::Label^  NoteLabel;
	private: System::Windows::Forms::Label^  OutputLabel;



	private:
		/// <summary>
		System::String^ fileName;
		System::ComponentModel::ComponentResourceManager^  theResources;
		int filePtrLoaded;

	private: System::Windows::Forms::OpenFileDialog^  openFileDialog1;
private: System::Windows::Forms::SaveFileDialog^  saveFileDialog1;
private: System::Windows::Forms::SaveFileDialog^  exportSaveDialog;
private: System::Windows::Forms::Label^  label2;
private: System::Windows::Forms::Label^  label1;
private: System::Windows::Forms::NumericUpDown^  RefOctave;

private: System::Windows::Forms::ComboBox^  NoteCombo;
private: System::Windows::Forms::NumericUpDown^  FrequencyNumeric;
private: System::Windows::Forms::TextBox^  NoteTextBox;
private: System::Windows::Forms::Label^  NoteSharpLabel;
private: System::Windows::Forms::PictureBox^  KeyDSharp;
private: System::Windows::Forms::PictureBox^  KeyASharp;
private: System::Windows::Forms::PictureBox^  KeyGSharp;
private: System::Windows::Forms::PictureBox^  KeyFSharp;
private: System::Windows::Forms::PictureBox^  KeyCSharp;
private: System::Windows::Forms::PictureBox^  DSharpDown;
private: System::Windows::Forms::PictureBox^  ASharpDown;
private: System::Windows::Forms::PictureBox^  GSharpDown;
private: System::Windows::Forms::PictureBox^  FSharpDown;
private: System::Windows::Forms::PictureBox^  CSharpDown;
private: System::Windows::Forms::PictureBox^  KeyB;
private: System::Windows::Forms::PictureBox^  KeyA;
private: System::Windows::Forms::PictureBox^  KeyF;
private: System::Windows::Forms::PictureBox^  KeyD;
private: System::Windows::Forms::PictureBox^  KeyE;
private: System::Windows::Forms::PictureBox^  KeyC;
private: System::Windows::Forms::PictureBox^  KeyG;
private: System::Windows::Forms::PictureBox^  BDown;
private: System::Windows::Forms::PictureBox^  ADown;
private: System::Windows::Forms::PictureBox^  FDown;
private: System::Windows::Forms::PictureBox^  DDown;
private: System::Windows::Forms::PictureBox^  EDown;
private: System::Windows::Forms::PictureBox^  CDown;
private: System::Windows::Forms::PictureBox^  GDown;
	private: System::Windows::Forms::ToolStripMenuItem^  helpToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  aboutToolStripMenuItem;

		 /// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(WinFormMezzoForte::typeid));
			this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
			this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->newToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->opeToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->saveToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->saveAsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->toolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripSeparator());
			this->exportToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->toolStripMenuItem2 = (gcnew System::Windows::Forms::ToolStripSeparator());
			this->exitToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->OctaveNumericBox = (gcnew System::Windows::Forms::NumericUpDown());
			this->OctaveLabel = (gcnew System::Windows::Forms::Label());
			this->ClearButton = (gcnew System::Windows::Forms::Button());
			this->PlaybackButton = (gcnew System::Windows::Forms::Button());
			this->NoteLabel = (gcnew System::Windows::Forms::Label());
			this->OutputLabel = (gcnew System::Windows::Forms::Label());
			this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());
			this->saveFileDialog1 = (gcnew System::Windows::Forms::SaveFileDialog());
			this->exportSaveDialog = (gcnew System::Windows::Forms::SaveFileDialog());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->RefOctave = (gcnew System::Windows::Forms::NumericUpDown());
			this->NoteCombo = (gcnew System::Windows::Forms::ComboBox());
			this->FrequencyNumeric = (gcnew System::Windows::Forms::NumericUpDown());
			this->NoteTextBox = (gcnew System::Windows::Forms::TextBox());
			this->NoteSharpLabel = (gcnew System::Windows::Forms::Label());
			this->KeyDSharp = (gcnew System::Windows::Forms::PictureBox());
			this->KeyASharp = (gcnew System::Windows::Forms::PictureBox());
			this->KeyGSharp = (gcnew System::Windows::Forms::PictureBox());
			this->KeyFSharp = (gcnew System::Windows::Forms::PictureBox());
			this->KeyCSharp = (gcnew System::Windows::Forms::PictureBox());
			this->DSharpDown = (gcnew System::Windows::Forms::PictureBox());
			this->ASharpDown = (gcnew System::Windows::Forms::PictureBox());
			this->GSharpDown = (gcnew System::Windows::Forms::PictureBox());
			this->FSharpDown = (gcnew System::Windows::Forms::PictureBox());
			this->CSharpDown = (gcnew System::Windows::Forms::PictureBox());
			this->KeyB = (gcnew System::Windows::Forms::PictureBox());
			this->KeyA = (gcnew System::Windows::Forms::PictureBox());
			this->KeyF = (gcnew System::Windows::Forms::PictureBox());
			this->KeyD = (gcnew System::Windows::Forms::PictureBox());
			this->KeyE = (gcnew System::Windows::Forms::PictureBox());
			this->KeyC = (gcnew System::Windows::Forms::PictureBox());
			this->KeyG = (gcnew System::Windows::Forms::PictureBox());
			this->BDown = (gcnew System::Windows::Forms::PictureBox());
			this->ADown = (gcnew System::Windows::Forms::PictureBox());
			this->FDown = (gcnew System::Windows::Forms::PictureBox());
			this->DDown = (gcnew System::Windows::Forms::PictureBox());
			this->EDown = (gcnew System::Windows::Forms::PictureBox());
			this->CDown = (gcnew System::Windows::Forms::PictureBox());
			this->GDown = (gcnew System::Windows::Forms::PictureBox());
			this->helpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->aboutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->menuStrip1->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->OctaveNumericBox))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->RefOctave))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->FrequencyNumeric))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyDSharp))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyASharp))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyGSharp))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyFSharp))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyCSharp))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->DSharpDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->ASharpDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->GSharpDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->FSharpDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->CSharpDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyB))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyA))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyF))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyD))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyE))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyC))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyG))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->BDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->ADown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->FDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->DDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->EDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->CDown))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->GDown))->BeginInit();
			this->SuspendLayout();
			// 
			// menuStrip1
			// 
			this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->fileToolStripMenuItem, 
				this->helpToolStripMenuItem});
			this->menuStrip1->Location = System::Drawing::Point(0, 0);
			this->menuStrip1->Name = L"menuStrip1";
			this->menuStrip1->Size = System::Drawing::Size(484, 24);
			this->menuStrip1->TabIndex = 0;
			this->menuStrip1->Text = L"menuStrip1";
			// 
			// fileToolStripMenuItem
			// 
			this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(8) {this->newToolStripMenuItem, 
				this->opeToolStripMenuItem, this->saveToolStripMenuItem, this->saveAsToolStripMenuItem, this->toolStripMenuItem1, this->exportToolStripMenuItem, 
				this->toolStripMenuItem2, this->exitToolStripMenuItem});
			this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";
			this->fileToolStripMenuItem->Size = System::Drawing::Size(35, 20);
			this->fileToolStripMenuItem->Text = L"File";
			// 
			// newToolStripMenuItem
			// 
			this->newToolStripMenuItem->Name = L"newToolStripMenuItem";
			this->newToolStripMenuItem->Size = System::Drawing::Size(153, 22);
			this->newToolStripMenuItem->Text = L"New";
			this->newToolStripMenuItem->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::newToolStripMenuItem_Click);
			// 
			// opeToolStripMenuItem
			// 
			this->opeToolStripMenuItem->Name = L"opeToolStripMenuItem";
			this->opeToolStripMenuItem->Size = System::Drawing::Size(153, 22);
			this->opeToolStripMenuItem->Text = L"Open";
			this->opeToolStripMenuItem->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::opeToolStripMenuItem_Click);
			// 
			// saveToolStripMenuItem
			// 
			this->saveToolStripMenuItem->Name = L"saveToolStripMenuItem";
			this->saveToolStripMenuItem->Size = System::Drawing::Size(153, 22);
			this->saveToolStripMenuItem->Text = L"Save";
			this->saveToolStripMenuItem->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::saveToolStripMenuItem_Click);
			// 
			// saveAsToolStripMenuItem
			// 
			this->saveAsToolStripMenuItem->Name = L"saveAsToolStripMenuItem";
			this->saveAsToolStripMenuItem->Size = System::Drawing::Size(153, 22);
			this->saveAsToolStripMenuItem->Text = L"Save As...";
			this->saveAsToolStripMenuItem->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::saveAsToolStripMenuItem_Click);
			// 
			// toolStripMenuItem1
			// 
			this->toolStripMenuItem1->Name = L"toolStripMenuItem1";
			this->toolStripMenuItem1->Size = System::Drawing::Size(150, 6);
			// 
			// exportToolStripMenuItem
			// 
			this->exportToolStripMenuItem->Name = L"exportToolStripMenuItem";
			this->exportToolStripMenuItem->Size = System::Drawing::Size(153, 22);
			this->exportToolStripMenuItem->Text = L"Convert to .MFS";
			this->exportToolStripMenuItem->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::exportToolStripMenuItem_Click);
			// 
			// toolStripMenuItem2
			// 
			this->toolStripMenuItem2->Name = L"toolStripMenuItem2";
			this->toolStripMenuItem2->Size = System::Drawing::Size(150, 6);
			// 
			// exitToolStripMenuItem
			// 
			this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem";
			this->exitToolStripMenuItem->Size = System::Drawing::Size(153, 22);
			this->exitToolStripMenuItem->Text = L"Exit";
			this->exitToolStripMenuItem->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::exitToolStripMenuItem_Click);
			// 
			// OctaveNumericBox
			// 
			this->OctaveNumericBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->OctaveNumericBox->Location = System::Drawing::Point(143, 317);
			this->OctaveNumericBox->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {9, 0, 0, 0});
			this->OctaveNumericBox->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {2, 0, 0, 0});
			this->OctaveNumericBox->Name = L"OctaveNumericBox";
			this->OctaveNumericBox->Size = System::Drawing::Size(50, 26);
			this->OctaveNumericBox->TabIndex = 17;
			this->OctaveNumericBox->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {4, 0, 0, 0});
			// 
			// OctaveLabel
			// 
			this->OctaveLabel->AutoSize = true;
			this->OctaveLabel->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 15.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->OctaveLabel->Location = System::Drawing::Point(42, 317);
			this->OctaveLabel->Name = L"OctaveLabel";
			this->OctaveLabel->Size = System::Drawing::Size(86, 25);
			this->OctaveLabel->TabIndex = 18;
			this->OctaveLabel->Text = L"Octave:";
			// 
			// ClearButton
			// 
			this->ClearButton->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->ClearButton->Location = System::Drawing::Point(145, 486);
			this->ClearButton->Name = L"ClearButton";
			this->ClearButton->Size = System::Drawing::Size(123, 57);
			this->ClearButton->TabIndex = 19;
			this->ClearButton->Text = L"Clear Notes";
			this->ClearButton->UseVisualStyleBackColor = true;
			this->ClearButton->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::ClearButton_Click);
			// 
			// PlaybackButton
			// 
			this->PlaybackButton->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->PlaybackButton->Location = System::Drawing::Point(0, 486);
			this->PlaybackButton->Name = L"PlaybackButton";
			this->PlaybackButton->Size = System::Drawing::Size(123, 57);
			this->PlaybackButton->TabIndex = 20;
			this->PlaybackButton->Text = L"Playback Notes";
			this->PlaybackButton->UseVisualStyleBackColor = true;
			this->PlaybackButton->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::PlaybackButton_Click);
			// 
			// NoteLabel
			// 
			this->NoteLabel->AutoSize = true;
			this->NoteLabel->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->NoteLabel->Location = System::Drawing::Point(2, 294);
			this->NoteLabel->Name = L"NoteLabel";
			this->NoteLabel->Size = System::Drawing::Size(260, 20);
			this->NoteLabel->TabIndex = 21;
			this->NoteLabel->Text = L"  C     D     E     F     G     A      B";
			this->NoteLabel->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyC_MouseDown);
			this->NoteLabel->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyC_MouseUp);
			// 
			// OutputLabel
			// 
			this->OutputLabel->AutoSize = true;
			this->OutputLabel->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->OutputLabel->Location = System::Drawing::Point(319, 29);
			this->OutputLabel->Name = L"OutputLabel";
			this->OutputLabel->Size = System::Drawing::Size(122, 24);
			this->OutputLabel->TabIndex = 23;
			this->OutputLabel->Text = L"Note Output";
			// 
			// openFileDialog1
			// 
			this->openFileDialog1->FileName = L"openFileDialog1";
			// 
			// saveFileDialog1
			// 
			this->saveFileDialog1->DefaultExt = L"MGT";
			this->saveFileDialog1->FileName = L"SampleName";
			this->saveFileDialog1->Tag = L".MGT";
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label2->Location = System::Drawing::Point(40, 427);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(211, 16);
			this->label2->TabIndex = 28;
			this->label2->Text = L"Frequency of Reference Note";
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label1->Location = System::Drawing::Point(40, 368);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(200, 16);
			this->label1->TabIndex = 27;
			this->label1->Text = L"Reference Note and Octave";
			// 
			// RefOctave
			// 
			this->RefOctave->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->RefOctave->Location = System::Drawing::Point(141, 387);
			this->RefOctave->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {9, 0, 0, 0});
			this->RefOctave->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {2, 0, 0, 0});
			this->RefOctave->Name = L"RefOctave";
			this->RefOctave->Size = System::Drawing::Size(52, 20);
			this->RefOctave->TabIndex = 26;
			this->RefOctave->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
			this->RefOctave->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {4, 0, 0, 0});
			// 
			// NoteCombo
			// 
			this->NoteCombo->AllowDrop = true;
			this->NoteCombo->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
			this->NoteCombo->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->NoteCombo->FormattingEnabled = true;
			this->NoteCombo->Items->AddRange(gcnew cli::array< System::Object^  >(12) {L"A ", L"A#", L"B ", L"C", L"C#", L"D ", L"D#", 
				L"E ", L"F ", L"F#", L"G ", L"G#"});
			this->NoteCombo->Location = System::Drawing::Point(87, 387);
			this->NoteCombo->MaxDropDownItems = 12;
			this->NoteCombo->Name = L"NoteCombo";
			this->NoteCombo->Size = System::Drawing::Size(48, 21);
			this->NoteCombo->TabIndex = 1;
			// 
			// FrequencyNumeric
			// 
			this->FrequencyNumeric->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->FrequencyNumeric->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 0});
			this->FrequencyNumeric->Location = System::Drawing::Point(87, 446);
			this->FrequencyNumeric->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {2000, 0, 0, 0});
			this->FrequencyNumeric->Name = L"FrequencyNumeric";
			this->FrequencyNumeric->Size = System::Drawing::Size(106, 20);
			this->FrequencyNumeric->TabIndex = 24;
			this->FrequencyNumeric->TextAlign = System::Windows::Forms::HorizontalAlignment::Center;
			this->FrequencyNumeric->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {440, 0, 0, 0});
			// 
			// NoteTextBox
			// 
			this->NoteTextBox->Location = System::Drawing::Point(274, 56);
			this->NoteTextBox->MaxLength = 1000000000;
			this->NoteTextBox->Multiline = true;
			this->NoteTextBox->Name = L"NoteTextBox";
			this->NoteTextBox->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
			this->NoteTextBox->Size = System::Drawing::Size(208, 487);
			this->NoteTextBox->TabIndex = 16;
			// 
			// NoteSharpLabel
			// 
			this->NoteSharpLabel->AutoSize = true;
			this->NoteSharpLabel->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->NoteSharpLabel->Location = System::Drawing::Point(12, 37);
			this->NoteSharpLabel->Name = L"NoteSharpLabel";
			this->NoteSharpLabel->Size = System::Drawing::Size(253, 16);
			this->NoteSharpLabel->TabIndex = 22;
			this->NoteSharpLabel->Text = L"C#/Db D#/Eb     F#/Gb G#/Ab A#/Bb";
			// 
			// KeyDSharp
			// 
			this->KeyDSharp->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyDSharp.Image")));
			this->KeyDSharp->Location = System::Drawing::Point(64, 56);
			this->KeyDSharp->Name = L"KeyDSharp";
			this->KeyDSharp->Size = System::Drawing::Size(22, 120);
			this->KeyDSharp->TabIndex = 76;
			this->KeyDSharp->TabStop = false;
			this->KeyDSharp->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyDSharp_MouseDown);
			this->KeyDSharp->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyDSharp_MouseUp);
			// 
			// KeyASharp
			// 
			this->KeyASharp->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyASharp.Image")));
			this->KeyASharp->Location = System::Drawing::Point(218, 56);
			this->KeyASharp->Name = L"KeyASharp";
			this->KeyASharp->Size = System::Drawing::Size(22, 120);
			this->KeyASharp->TabIndex = 75;
			this->KeyASharp->TabStop = false;
			this->KeyASharp->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyASharp_MouseDown);
			this->KeyASharp->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyASharp_MouseUp);
			// 
			// KeyGSharp
			// 
			this->KeyGSharp->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyGSharp.Image")));
			this->KeyGSharp->Location = System::Drawing::Point(181, 56);
			this->KeyGSharp->Name = L"KeyGSharp";
			this->KeyGSharp->Size = System::Drawing::Size(22, 120);
			this->KeyGSharp->TabIndex = 74;
			this->KeyGSharp->TabStop = false;
			this->KeyGSharp->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyGSharp_MouseDown);
			this->KeyGSharp->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyGSharp_MouseUp);
			// 
			// KeyFSharp
			// 
			this->KeyFSharp->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyFSharp.Image")));
			this->KeyFSharp->Location = System::Drawing::Point(143, 56);
			this->KeyFSharp->Name = L"KeyFSharp";
			this->KeyFSharp->Size = System::Drawing::Size(22, 120);
			this->KeyFSharp->TabIndex = 73;
			this->KeyFSharp->TabStop = false;
			this->KeyFSharp->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyFSharp_MouseDown);
			this->KeyFSharp->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyFSharp_MouseUp);
			// 
			// KeyCSharp
			// 
			this->KeyCSharp->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyCSharp.Image")));
			this->KeyCSharp->Location = System::Drawing::Point(28, 56);
			this->KeyCSharp->Name = L"KeyCSharp";
			this->KeyCSharp->Size = System::Drawing::Size(22, 120);
			this->KeyCSharp->TabIndex = 66;
			this->KeyCSharp->TabStop = false;
			this->KeyCSharp->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyCSharp_MouseDown);
			this->KeyCSharp->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyCSharp_MouseUp);
			// 
			// DSharpDown
			// 
			this->DSharpDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"DSharpDown.Image")));
			this->DSharpDown->Location = System::Drawing::Point(64, 56);
			this->DSharpDown->Name = L"DSharpDown";
			this->DSharpDown->Size = System::Drawing::Size(22, 120);
			this->DSharpDown->TabIndex = 88;
			this->DSharpDown->TabStop = false;
			this->DSharpDown->Visible = false;
			this->DSharpDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyDSharp_MouseDown);
			this->DSharpDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyDSharp_MouseUp);
			// 
			// ASharpDown
			// 
			this->ASharpDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"ASharpDown.Image")));
			this->ASharpDown->Location = System::Drawing::Point(218, 56);
			this->ASharpDown->Name = L"ASharpDown";
			this->ASharpDown->Size = System::Drawing::Size(22, 120);
			this->ASharpDown->TabIndex = 87;
			this->ASharpDown->TabStop = false;
			this->ASharpDown->Visible = false;
			this->ASharpDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyASharp_MouseDown);
			this->ASharpDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyASharp_MouseUp);
			// 
			// GSharpDown
			// 
			this->GSharpDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"GSharpDown.Image")));
			this->GSharpDown->Location = System::Drawing::Point(181, 56);
			this->GSharpDown->Name = L"GSharpDown";
			this->GSharpDown->Size = System::Drawing::Size(22, 120);
			this->GSharpDown->TabIndex = 86;
			this->GSharpDown->TabStop = false;
			this->GSharpDown->Visible = false;
			this->GSharpDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyGSharp_MouseDown);
			this->GSharpDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyGSharp_MouseUp);
			// 
			// FSharpDown
			// 
			this->FSharpDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"FSharpDown.Image")));
			this->FSharpDown->Location = System::Drawing::Point(143, 56);
			this->FSharpDown->Name = L"FSharpDown";
			this->FSharpDown->Size = System::Drawing::Size(22, 120);
			this->FSharpDown->TabIndex = 85;
			this->FSharpDown->TabStop = false;
			this->FSharpDown->Visible = false;
			this->FSharpDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyFSharp_MouseDown);
			this->FSharpDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyFSharp_MouseUp);
			// 
			// CSharpDown
			// 
			this->CSharpDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"CSharpDown.Image")));
			this->CSharpDown->Location = System::Drawing::Point(28, 56);
			this->CSharpDown->Name = L"CSharpDown";
			this->CSharpDown->Size = System::Drawing::Size(22, 120);
			this->CSharpDown->TabIndex = 78;
			this->CSharpDown->TabStop = false;
			this->CSharpDown->Visible = false;
			this->CSharpDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyCSharp_MouseDown);
			this->CSharpDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyCSharp_MouseUp);
			// 
			// KeyB
			// 
			this->KeyB->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyB.Image")));
			this->KeyB->Location = System::Drawing::Point(227, 56);
			this->KeyB->Name = L"KeyB";
			this->KeyB->Size = System::Drawing::Size(41, 232);
			this->KeyB->TabIndex = 72;
			this->KeyB->TabStop = false;
			this->KeyB->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyB_MouseDown);
			this->KeyB->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyB_MouseUp);
			// 
			// KeyA
			// 
			this->KeyA->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyA.Image")));
			this->KeyA->Location = System::Drawing::Point(190, 56);
			this->KeyA->Name = L"KeyA";
			this->KeyA->Size = System::Drawing::Size(41, 232);
			this->KeyA->TabIndex = 71;
			this->KeyA->TabStop = false;
			this->KeyA->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyA_MouseDown);
			this->KeyA->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyA_MouseUp);
			// 
			// KeyF
			// 
			this->KeyF->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyF.Image")));
			this->KeyF->Location = System::Drawing::Point(115, 56);
			this->KeyF->Name = L"KeyF";
			this->KeyF->Size = System::Drawing::Size(41, 232);
			this->KeyF->TabIndex = 70;
			this->KeyF->TabStop = false;
			this->KeyF->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyF_MouseDown);
			this->KeyF->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyF_MouseUp);
			// 
			// KeyD
			// 
			this->KeyD->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyD.Image")));
			this->KeyD->Location = System::Drawing::Point(38, 56);
			this->KeyD->Name = L"KeyD";
			this->KeyD->Size = System::Drawing::Size(41, 232);
			this->KeyD->TabIndex = 69;
			this->KeyD->TabStop = false;
			this->KeyD->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyD_MouseDown);
			this->KeyD->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyD_MouseUp);
			// 
			// KeyE
			// 
			this->KeyE->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyE.Image")));
			this->KeyE->Location = System::Drawing::Point(74, 56);
			this->KeyE->Name = L"KeyE";
			this->KeyE->Size = System::Drawing::Size(41, 232);
			this->KeyE->TabIndex = 68;
			this->KeyE->TabStop = false;
			this->KeyE->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyE_MouseDown);
			this->KeyE->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyE_MouseUp);
			// 
			// KeyC
			// 
			this->KeyC->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyC.Image")));
			this->KeyC->Location = System::Drawing::Point(0, 56);
			this->KeyC->Name = L"KeyC";
			this->KeyC->Size = System::Drawing::Size(41, 232);
			this->KeyC->TabIndex = 67;
			this->KeyC->TabStop = false;
			this->KeyC->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyC_MouseDown);
			this->KeyC->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyC_MouseUp);
			// 
			// KeyG
			// 
			this->KeyG->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"KeyG.Image")));
			this->KeyG->Location = System::Drawing::Point(153, 56);
			this->KeyG->Name = L"KeyG";
			this->KeyG->Size = System::Drawing::Size(41, 232);
			this->KeyG->TabIndex = 65;
			this->KeyG->TabStop = false;
			this->KeyG->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyG_MouseDown);
			this->KeyG->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyG_MouseUp);
			// 
			// BDown
			// 
			this->BDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"BDown.Image")));
			this->BDown->Location = System::Drawing::Point(227, 56);
			this->BDown->Name = L"BDown";
			this->BDown->Size = System::Drawing::Size(41, 232);
			this->BDown->TabIndex = 84;
			this->BDown->TabStop = false;
			this->BDown->Visible = false;
			this->BDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyB_MouseDown);
			this->BDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyB_MouseUp);
			// 
			// ADown
			// 
			this->ADown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"ADown.Image")));
			this->ADown->Location = System::Drawing::Point(190, 56);
			this->ADown->Name = L"ADown";
			this->ADown->Size = System::Drawing::Size(41, 232);
			this->ADown->TabIndex = 83;
			this->ADown->TabStop = false;
			this->ADown->Visible = false;
			this->ADown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyA_MouseDown);
			this->ADown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyA_MouseUp);
			// 
			// FDown
			// 
			this->FDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"FDown.Image")));
			this->FDown->Location = System::Drawing::Point(115, 56);
			this->FDown->Name = L"FDown";
			this->FDown->Size = System::Drawing::Size(41, 232);
			this->FDown->TabIndex = 82;
			this->FDown->TabStop = false;
			this->FDown->Visible = false;
			this->FDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyF_MouseDown);
			this->FDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyF_MouseUp);
			// 
			// DDown
			// 
			this->DDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"DDown.Image")));
			this->DDown->Location = System::Drawing::Point(38, 56);
			this->DDown->Name = L"DDown";
			this->DDown->Size = System::Drawing::Size(41, 232);
			this->DDown->TabIndex = 81;
			this->DDown->TabStop = false;
			this->DDown->Visible = false;
			this->DDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyD_MouseDown);
			this->DDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyD_MouseUp);
			// 
			// EDown
			// 
			this->EDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"EDown.Image")));
			this->EDown->Location = System::Drawing::Point(74, 56);
			this->EDown->Name = L"EDown";
			this->EDown->Size = System::Drawing::Size(41, 232);
			this->EDown->TabIndex = 80;
			this->EDown->TabStop = false;
			this->EDown->Visible = false;
			this->EDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyE_MouseDown);
			this->EDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyE_MouseUp);
			// 
			// CDown
			// 
			this->CDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"CDown.Image")));
			this->CDown->Location = System::Drawing::Point(0, 56);
			this->CDown->Name = L"CDown";
			this->CDown->Size = System::Drawing::Size(41, 232);
			this->CDown->TabIndex = 79;
			this->CDown->TabStop = false;
			this->CDown->Visible = false;
			this->CDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyC_MouseDown);
			this->CDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyC_MouseUp);
			// 
			// GDown
			// 
			this->GDown->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"GDown.Image")));
			this->GDown->Location = System::Drawing::Point(153, 56);
			this->GDown->Name = L"GDown";
			this->GDown->Size = System::Drawing::Size(41, 232);
			this->GDown->TabIndex = 77;
			this->GDown->TabStop = false;
			this->GDown->Visible = false;
			this->GDown->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyG_MouseDown);
			this->GDown->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &WinFormMezzoForte::KeyG_MouseUp);
			// 
			// helpToolStripMenuItem
			// 
			this->helpToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) {this->aboutToolStripMenuItem});
			this->helpToolStripMenuItem->Name = L"helpToolStripMenuItem";
			this->helpToolStripMenuItem->Size = System::Drawing::Size(40, 20);
			this->helpToolStripMenuItem->Text = L"Help";
			// 
			// aboutToolStripMenuItem
			// 
			this->aboutToolStripMenuItem->Name = L"aboutToolStripMenuItem";
			this->aboutToolStripMenuItem->Size = System::Drawing::Size(152, 22);
			this->aboutToolStripMenuItem->Text = L"About";
			this->aboutToolStripMenuItem->Click += gcnew System::EventHandler(this, &WinFormMezzoForte::aboutToolStripMenuItem_Click_1);
			// 
			// WinFormMezzoForte
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(484, 550);
			this->Controls->Add(this->KeyDSharp);
			this->Controls->Add(this->KeyASharp);
			this->Controls->Add(this->KeyGSharp);
			this->Controls->Add(this->KeyFSharp);
			this->Controls->Add(this->KeyCSharp);
			this->Controls->Add(this->DSharpDown);
			this->Controls->Add(this->ASharpDown);
			this->Controls->Add(this->GSharpDown);
			this->Controls->Add(this->FSharpDown);
			this->Controls->Add(this->CSharpDown);
			this->Controls->Add(this->KeyB);
			this->Controls->Add(this->KeyA);
			this->Controls->Add(this->KeyF);
			this->Controls->Add(this->KeyD);
			this->Controls->Add(this->KeyE);
			this->Controls->Add(this->KeyC);
			this->Controls->Add(this->KeyG);
			this->Controls->Add(this->BDown);
			this->Controls->Add(this->ADown);
			this->Controls->Add(this->FDown);
			this->Controls->Add(this->DDown);
			this->Controls->Add(this->EDown);
			this->Controls->Add(this->CDown);
			this->Controls->Add(this->GDown);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->label1);
			this->Controls->Add(this->RefOctave);
			this->Controls->Add(this->NoteCombo);
			this->Controls->Add(this->FrequencyNumeric);
			this->Controls->Add(this->OutputLabel);
			this->Controls->Add(this->NoteSharpLabel);
			this->Controls->Add(this->NoteLabel);
			this->Controls->Add(this->PlaybackButton);
			this->Controls->Add(this->ClearButton);
			this->Controls->Add(this->OctaveLabel);
			this->Controls->Add(this->OctaveNumericBox);
			this->Controls->Add(this->NoteTextBox);
			this->Controls->Add(this->menuStrip1);
			this->MainMenuStrip = this->menuStrip1;
			this->Name = L"WinFormMezzoForte";
			this->Text = L"Mezzo Forte\'s Music Creator";
			this->Load += gcnew System::EventHandler(this, &WinFormMezzoForte::WinFormMezzoForte_Load);
			this->menuStrip1->ResumeLayout(false);
			this->menuStrip1->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->OctaveNumericBox))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->RefOctave))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->FrequencyNumeric))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyDSharp))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyASharp))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyGSharp))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyFSharp))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyCSharp))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->DSharpDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->ASharpDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->GSharpDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->FSharpDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->CSharpDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyB))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyA))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyF))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyD))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyE))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyC))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->KeyG))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->BDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->ADown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->FDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->DDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->EDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->CDown))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->GDown))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
private: System::Void ClearButton_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			this->NoteTextBox->Text = "";
		 }
/*
 *
 * C Event Handlers
 *
 */
private: System::Void KeyC_Click(System::Object^  sender, System::EventArgs^  e) 
		 {

			 this->NoteTextBox->Text += "C_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyC_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyC->Visible = true;
			 this->CDown->Visible = false;

			 this->NoteTextBox->Text += "C_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyC_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyC->Visible = false;
			 this->CDown->Visible = true;

			 int var = LoadALData(3, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }
/*
 *
 * D Event Handlers
 *
 */
private: System::Void KeyD_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "D_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyD_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyD->Visible = true;
			 this->DDown->Visible = false;

			 this->NoteTextBox->Text += "D_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyD_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyD->Visible = false;
			 this->DDown->Visible = true;

			 int var = LoadALData(5, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }
/*
 *
 * E Event Handlers
 *
 */
private: System::Void KeyE_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "E_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyE_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyE->Visible = true;
			 this->EDown->Visible = false;

			 this->NoteTextBox->Text += "E_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyE_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyE->Visible = false;
			 this->EDown->Visible = true;

			 int var = LoadALData(7, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }
/*
 *
 * F Event Handlers
 *
 */
private: System::Void KeyF_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "F_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyF_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyF->Visible = true;
			 this->FDown->Visible = false;

			 this->NoteTextBox->Text += "F_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyF_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyF->Visible = false;
			 this->FDown->Visible = true;

			 int var = LoadALData(8, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }
/*
 *
 * G Event Handlers
 *
 */
private: System::Void KeyG_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "G_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyG_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyG->Visible = true;
			 this->GDown->Visible = false;

			 this->NoteTextBox->Text += "G_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyG_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyG->Visible = false;
			 this->GDown->Visible = true;

			 int var = LoadALData(10, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }
/*
 *
 * A Event Handlers
 *
 */
private: System::Void KeyA_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "A_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyA_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyA->Visible = true;
			 this->ADown->Visible = false;

			 this->NoteTextBox->Text += "A_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyA_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyA->Visible = false;
			 this->ADown->Visible = true;

			 int var = LoadALData(0, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }

/*
 *
 * B Event Handlers
 *
 */
private: System::Void KeyB_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "B_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyB_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyB->Visible = false;
			 this->BDown->Visible = true;

			 int var = LoadALData(2, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }

private: System::Void KeyB_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyB->Visible = true;
			 this->BDown->Visible = false;

			 this->NoteTextBox->Text += "B_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }
/*
 *
 * CSharp Event Handlers
 *
 */
private: System::Void KeyCSharp_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "C#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyCSharp_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyCSharp->Visible = false;
			 this->CSharpDown->Visible = true;

			 int var = LoadALData(4, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }

private: System::Void KeyCSharp_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyCSharp->Visible = true;
			 this->CSharpDown->Visible = false;

			 this->NoteTextBox->Text += "C#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }
/*
 *
 * DSharp Event Handlers
 *
 */
private: System::Void KeyDSharp_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "D#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyDSharp_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyDSharp->Visible = false;
			 this->DSharpDown->Visible = true;

			 int var = LoadALData(6, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }

private: System::Void KeyDSharp_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyDSharp->Visible = true;
			 this->DSharpDown->Visible = false;

			 this->NoteTextBox->Text += "D#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }
/*
 *
 * FSharp Event Handlers
 *
 */
private: System::Void KeyFSharp_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "F#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyFSharp_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyFSharp->Visible = false;
			 this->FSharpDown->Visible = true;

			 int var = LoadALData(9, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }

private: System::Void KeyFSharp_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyFSharp->Visible = true;
			 this->FSharpDown->Visible = false;

			 this->NoteTextBox->Text += "F#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }
/*
 *
 * GSharp Event Handlers
 *
 */
private: System::Void KeyGSharp_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "G#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyGSharp_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyGSharp->Visible = false;
			 this->GSharpDown->Visible = true;

			 int var = LoadALData(11, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }

private: System::Void KeyGSharp_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyGSharp->Visible = true;
			 this->GSharpDown->Visible = false;

			 this->NoteTextBox->Text += "G#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }
/*
 *
 * ASharp Event Handlers
 *
 */
private: System::Void KeyASharp_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->NoteTextBox->Text += "A#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }

private: System::Void KeyASharp_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyASharp->Visible = false;
			 this->ASharpDown->Visible = true;

			 int var = LoadALData(1, (int)this->OctaveNumericBox->Value);
			 alSourcePlay(Source[var]);
		 }

private: System::Void KeyASharp_MouseUp(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) 
		 {
			 this->KeyASharp->Visible = true;
			 this->ASharpDown->Visible = false;

			 this->NoteTextBox->Text += "A#_";
			 this->NoteTextBox->Text += this->OctaveNumericBox->Value;
			 this->NoteTextBox->Text += "\r\n";
		 }


private: System::Void exitToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->Close();
		 }
private: System::Void newToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->filePtrLoaded = 0;
			 this->OctaveNumericBox->Value = 4;
			 this->NoteTextBox->Text = "";
			 this->NoteCombo->Text = "A";
			 this->RefOctave->Value = 4;
			 this->FrequencyNumeric->Value = 440;
		 }
private: System::Void opeToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 char c;
			 System::String^ text;
			 int i;
			 int done;

			 if(this->openFileDialog1->ShowDialog() != System::Windows::Forms::DialogResult::OK)
				 return;


			 fileName = this->openFileDialog1->FileName;
			 FileStream^ filePtr = (System::IO::FileStream^) gcnew System::IO::FileStream(this->openFileDialog1->FileName, System::IO::FileMode::OpenOrCreate);
			 this->filePtrLoaded = 1;
			 this->NoteTextBox->Text = "";

			 i = 0;
			 done = 0;
			 c = (char)filePtr->ReadByte();

			 while((c != -1) && !done)
			 {
				 if(c == 'Q')
				 {
					 done = 1;
				 }
				 else
				 {
					 text = gcnew String(&c);
					 this->NoteTextBox->Text += text;
				 }

				 c = (char)filePtr->ReadByte();
			 }

			 filePtr->Close();
		 }

private: System::Void saveAsToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->saveFileDialog1->Filter = "Mezzo Forte Generated Text (.MGT)|*.MGT|All Files (*.*)|*.*"; 
			 
			 if(this->saveFileDialog1->ShowDialog() != System::Windows::Forms::DialogResult::OK)
				 return;

			 fileName = this->saveFileDialog1->FileName;
			 

			 if(System::String::IsNullOrEmpty(fileName))
				 return;

			 System::IO::File::WriteAllText(fileName, this->NoteTextBox->Text);
			 this->filePtrLoaded = 1;
		 }
private: System::Void saveToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 if(this->filePtrLoaded)
				 System::IO::File::WriteAllText(this->fileName, this->NoteTextBox->Text);
			 else
				WinFormMezzoForte::saveAsToolStripMenuItem_Click(sender, e);
		 }
private: System::Void exportToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 System::String^ out;
			 char* out2;

			 saveToolStripMenuItem_Click(sender, e);

			 if(this->exportSaveDialog->ShowDialog() != System::Windows::Forms::DialogResult::OK)
				 return;

			 out = ".\\ExportTools\\MGFtoMFS.exe \"" + this->fileName + "\" \"" +this->exportSaveDialog->FileName + "\" " + this->NoteCombo->SelectedIndex + " " + this->OctaveNumericBox->Value + " " + this->FrequencyNumeric->Value;
			 out2 = (char*)(void*)Marshal::StringToHGlobalAnsi(out);
			 
			 int ret = system(out2);
		 }
private: System::Void PlaybackButton_Click(System::Object^  sender, System::EventArgs^  e) 
		 {

		 }
private: System::Void aboutToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) 
		 {

		 }
private: System::Void GenerateTone(int note)
		 {
			 const int bufferLength = 500;

			 int other[12] = {9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8}; // A - G#

			 int currNote = other[note];
			 int currOct = (int)this->OctaveNumericBox->Value;
			 
			 int refNote = other[(int)this->NoteCombo->SelectedIndex];
			 int refOct = (int)this->RefOctave->Value;
			 int refFreq = (int)this->FrequencyNumeric->Value;

			 float volume = 0.5f;


		 }
private: System::Void mIDIToMFSConverterToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void WinFormMezzoForte_Load(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void aboutToolStripMenuItem_Click_1(System::Object^  sender, System::EventArgs^  e) 
		 {
			 MessageBox::Show("Mezzo Forte's Music Creator, Version 1.0\0", L"About\0", MessageBoxButtons::OK, MessageBoxIcon::Information);
		 }
};
		 
}

#endif
